function intTotalPage(totalnumber) {
  if(totalnumber % 10 == 0)
    return totalnumber/10;
  else {
    var totalPgNm = totalnumber / 10;
    var rtnVl = 1;
    for(var index = 1; index <= totalPgNm; index++) {
      if(index + 1 > totalPgNm)
        rtnVl = index + 1;
    }
    return rtnVl;
  }
  return 1;
}

function renderPager(page, text, first, last){
    var link = '<a data-ajax="false" href="'+page+'" data-role="button" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-up-c"><span class="ui-btn-inner"><span class="ui-btn-text">'+text+'</span></span></a>';

    if(first == '1'){
        link = '<a data-ajax="false" href="'+page+'" data-role="button" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c" class="ui-btn ui-shadow ui-btn-corner-all ui-first-child ui-btn-up-c"><span class="ui-btn-inner"><span class="ui-btn-text">'+text+'</span></span></a>';
    }

    if(last == '1'){
        link = '<a data-ajax="false" href="'+page+'" data-role="button" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="c" class="ui-btn ui-shadow ui-btn-corner-all ui-last-child ui-btn-up-c"><span class="ui-btn-inner"><span class="ui-btn-text">'+text+'</span></span></a>';
    }

    return link;
}
